.pragma library

function formatDateTime(unix_time, format) {
    var datetime = new Date(unix_time*1000);
    return Qt.formatDateTime(datetime, format);
}

function formatTVString(season, episode) {
    if(season === "" && episode === "") return "";
    var seasonString = season === "" ? "" : ("S"+season);
    var episodeString = episode === "" ? "" : ("E"+episode);
    return "<b>" + seasonString + episodeString + "</b>";
}

var _privs = {}

function priv(key) {
    var h = key.toString()
    console.log(h);
    var o = _privs[key]
    if (!o) {
        o = {}
        _privs[key] = o
    }
    return o
}
